/**
 * 
 */
package com.locky.ws;

import java.util.Collection;

import javax.persistence.*;

import java.util.ArrayList;


/** 
 * @author ambroise
 */
@Entity
@Embeddable
@Table(name="t-adresse")
public class Adresse {
	
	/**
	 * @uml.property  name="numero"
	 */
	private String numero;
	
	/**
	 * @uml.property  name="rue"
	 */
	private String rue;
	
	/**
	 * @uml.property  name="codePostal"
	 */
	private double codePostal;
	
	/**
	 * @uml.property  name="ville"
	 */
	private String ville;
	
	/**
	 * @uml.property  name="pays"
	 */
	private String pays;

	/**
	 * @uml.property  name="telephone"
	 */
	private String telephone;
	
	/** 
	 * @uml.property name="personnes"
	 * @uml.associationEnd multiplicity="(0 -1)" ordering="true" inverse="adresses:com.locky.ws.Personne"
	 */
	@ManyToMany(mappedBy="adresses", targetEntity = Personne.class)
	private ArrayList personne = new ArrayList<Personne>();

	/** 
	 * @uml.property name="acces"
	 * @uml.associationEnd multiplicity="(0 -1)" ordering="true" inverse="adresse:com.locky.ws.Acces"
	 */
	
	@OneToMany(mappedBy="adresse",targetEntity=Acces.class)
	private ArrayList acces = new ArrayList<Acces>();

    public Adresse()
    {
        // Dans le constructeur de la classe Adresse
    }


	/**
	 * Getter of the property <tt>numero</tt>
	 * @return  Returns the numero.
	 * @uml.property  name="numero"
	 */
	public String getNumero() {
		return numero;
	}

	/**
	 * Setter of the property <tt>numero</tt>
	 * @param numero  The numero to set.
	 * @uml.property  name="numero"
	 */
	public void setNumero(String numero) {
		this.numero = numero;
	}

	/**
	 * Getter of the property <tt>rue</tt>
	 * @return  Returns the rue.
	 * @uml.property  name="rue"
	 */
	public String getRue() {
		return rue;
	}

	/**
	 * Setter of the property <tt>rue</tt>
	 * @param rue  The rue to set.
	 * @uml.property  name="rue"
	 */
	public void setRue(String rue) {
		this.rue = rue;
	}

	/**
	 * Getter of the property <tt>codePostal</tt>
	 * @return  Returns the codePostal.
	 * @uml.property  name="codePostal"
	 */
	public double getCodePostal() {
		return codePostal;
	}

	/**
	 * Setter of the property <tt>codePostal</tt>
	 * @param codePostal  The codePostal to set.
	 * @uml.property  name="codePostal"
	 */
	public void setCodePostal(double codePostal) {
		this.codePostal = codePostal;
	}

	/**
	 * Getter of the property <tt>ville</tt>
	 * @return  Returns the ville.
	 * @uml.property  name="ville"
	 */
	public String getVille() {
		return ville;
	}

	/**
	 * Setter of the property <tt>ville</tt>
	 * @param ville  The ville to set.
	 * @uml.property  name="ville"
	 */
	public void setVille(String ville) {
		this.ville = ville;
	}

	/**
	 * Getter of the property <tt>pays</tt>
	 * @return  Returns the pays.
	 * @uml.property  name="pays"
	 */
	public String getPays() {
		return pays;
	}

	/**
	 * Setter of the property <tt>pays</tt>
	 * @param pays  The pays to set.
	 * @uml.property  name="pays"
	 */
	public void setPays(String pays) {
		this.pays = pays;
	}

	/**
	 * Getter of the property <tt>telephone</tt>
	 * @return  Returns the telephone.
	 * @uml.property  name="telephone"
	 */
	public String getTelephone() {
		return telephone;
	}

	/**
	 * Setter of the property <tt>telephone</tt>
	 * @param telephone  The telephone to set.
	 * @uml.property  name="telephone"
	 */
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	/** 
	 * Getter of the property <tt>personnes</tt>
	 * @return  Returns the personne.
	 * @uml.property  name="personnes"
	 */
	public ArrayList getPersonnes() {
		return personne;
	}

	/** 
	 * Getter of the property <tt>acces</tt>
	 * @return  Returns the acces.
	 * @uml.property  name="acces"
	 */
	public ArrayList getAcces() {
		return acces;
	}

	/** 
	 * Setter of the property <tt>acces</tt>
	 * @param acces  The acces to set.
	 * @uml.property  name="acces"
	 */
	public void setAcces(ArrayList acces) {
		this.acces = acces;
	}

	/**
	 * @uml.property  name="Id"
	 */
	@Id
	private int id;

	/**
	 * Getter of the property <tt>Id</tt>
	 * @return  Returns the id.
	 * @uml.property  name="Id"
	 */
	public int getId() {
		return id;
	}


	/**
	 * Setter of the property <tt>Id</tt>
	 * @param Id  The id to set.
	 * @uml.property  name="Id"
	 */
	public void setId(int id) {
		this.id = id;
	}


	/** 
	 * Setter of the property <tt>personnes</tt>
	 * @param personnes  The personne to set.
	 * @uml.property  name="personnes"
	 */
	public void setPersonnes(ArrayList personnes) {
		personne = personnes;
	}

}
